{% extends "base/base.html" %}
{% load bootstrap4 %}
{% load leaflet_tags %}
{% load staticfiles %}

{% block content %}
<form action="" method="post" class="form">
    {% csrf_token %}
    <div class="row">
        <div class="col-md-3" id="info">
            {% bootstrap_form_errors form %}
            {% bootstrap_field form.name show_label=False %}
            {% bootstrap_field form.description show_label=False %}
            {% bootstrap_field form.tags show_label=False %}
            {% bootstrap_field form.public show_label=False %}
            <div class="col-12 form-group text-center">
                {% bootstrap_button 'Save' button_type='submit' button_class='btn-success' %}
            </div>
        </div>
        <div class="col-md-9" id="map">
            {% bootstrap_field form.geom show_label=False %}
        </div>
    </div>
</form>
{% endblock %}

{% block css %}
    {% leaflet_css plugins="forms" %}
    <link href="{% static 'css/map-editor.css' %}" rel="stylesheet">
{% endblock %}

{% block js %}
    {% leaflet_js plugins="forms" %}
    <script src="{% static 'js/map-editor.js' %}"></script>
{% endblock %}
